from flask import Blueprint, render_template
from com.model import *

bp = Blueprint('home', __name__, url_prefix='/')


@bp.route('/')
def index():
    # 获取联系人数据
    persons = Person.query.all()
    data = [p.to_dict() for p in persons]
    return render_template('index.html', data=data)
